package 设计模式.行为型模式.Strategy_if_else.asr;

public class ASRClient {
    public static void main(String[] args) {
        ASRServiceFactory factory = new ASRServiceFactory();
        
        // 使用阿里云服务
        ASRService aliyunService = factory.getASRService("aliyun");
        ASRResponse ttsResponse = aliyunService.textToSpeech(new ASRRequest("你好，世界", "aliyun"));
        System.out.println("阿里云TTS结果: " + ttsResponse.getText());
        
        // 使用腾讯云服务
        ASRService tencentService = factory.getASRService("tencent");
        ASRResponse sttResponse = tencentService.speechToText(new ASRRequest("音频数据", "tencent"));
        System.out.println("腾讯云ASR结果: " + sttResponse.getText());
        
        // 使用默认服务
        ASRService defaultService = factory.getASRService("unknown");
        ASRResponse defaultResponse = defaultService.textToSpeech(new ASRRequest("测试", "unknown"));
        System.out.println("默认服务结果: " + defaultResponse.getText());
    }
}